@import "../../css/colors";
@import "../../css/units";
@import "../../css/colors";
@import "../../css/filters.css";

/* Popover styles */
/* body is for specificity to override some addons that set a lower z-index */
body :global(.Popover) {
    /* should be above menu bar */
    z-index: 500;

    /* color-scheme: dark causes very strange issues */
    color-scheme: light;
}

:global(.Popover-body) {
    color: $text-primary;
    background: $popover-background;
    border: 1px solid $ui-pane-border;
    padding: 4px;
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0px 0px 8px 1px $ui-pane-border;
}

:global(.Popover-tipShape) {
    fill: $popover-background;
    stroke: $ui-pane-border;
}

.clickable {
    cursor: pointer;
}

.swatch-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.row-header {
    font-family: "Helvetica Neue", Helvetica, sans-serif;
    font-size: 0.65rem;
    margin: 8px 8px 0 8px;
}

.label-name {
    font-weight: bold;
}

.divider {
    border-top: 1px solid $ui-pane-border;
    margin: 8px;
}

.swap-button {
    margin-left: 8px;
    margin-right: 8px;
}

.swatches {
    margin: 8px;
}

.swatch {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid $ui-pane-border;
    border-radius: 4px;
    box-sizing: content-box;
    display: flex;
    align-items: center;
}

.large-swatch-icon {
    width: 1.75rem;
    margin: auto;
}

.large-swatch {
    width: 2rem;
    height: 2rem;
}

.active-swatch {
    border: 1px solid $looks-secondary;
    box-shadow: 0px 0px 0px 3px $looks-transparent;
}

.swatch-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.picker-icon {
    filter: $filter-icon-gray;
}

.inactive-gradient {
    filter: saturate(0%);
}

.gradient-picker-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin: 8px;
    user-select: none;
}

[dir="ltr"] .gradient-picker-row > img + img {
    margin-left: calc(2 * $grid-unit);
}

[dir="rtl"] .gradient-picker-row > img + img {
    margin-right: calc(2 * $grid-unit);
}

[dir="rtl"] .gradient-swatches-row {
    flex-direction: row-reverse;
}

.picker-row {
    display: flex;
    margin: 8px;
    margin-top: 12px;
    width: 150px;
    align-items: center;
}
.picker-row .picker-color {
    border: none;
    border-radius: 0;
    padding: 0 0.2rem;
    width: 3rem;
    box-sizing: border-box;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
.picker-row .picker-text {
    box-sizing: border-box;
    width: 100%;
}
[dir="ltr"] .picker-row .picker-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
[dir="rtl"] .picker-row .picker-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
